#ifndef MAPCONFIG_HPP
#define MAPCONFIG_HPP

#include <QtGui>
#include "map.hpp"

class MapConfig : public QDialog {
	Q_OBJECT

	public:
		MapConfig(QWidget *parent = 0);
		void clear();
		void createGroupGeneral();
		void createGroupFond();
		void createGroupMusic();
		void setMap(Map* map);
		void refresh();

	public slots:
		void save();
		void quitter();
		void changeBackground();
		void changeMusic();

	private:
		QVBoxLayout *_generalLayout;
		QGroupBox *_general;
		QGroupBox *_music;
		QGroupBox *_background;
		QPushButton *_save;
		QPushButton *_quit;
		QHBoxLayout *_layout_button;

		// Group Général
		QFormLayout *_form_general;
		QLineEdit *_map_name;		// Nom de la map
		QLineEdit *_map_author;		// Auteur de la map
		QTextEdit *_map_comment;	// Commentaire de l'auteur

		// Group Background
		QFormLayout *_form_background;
		QPushButton *_change_background;

		// Group Music
		QFormLayout *_form_music;
		QPushButton *_change_music;

		// Map
		Map* _map;

		// Background Path
		QString _PathBackground;
		QString _PathMusic;
};

#endif // MAPCONFIG_HPP
